package com.macro.mall.portal.config;

import com.qcloud.cos.COSClient;
import com.qcloud.cos.ClientConfig;
import com.qcloud.cos.auth.BasicCOSCredentials;
import com.qcloud.cos.auth.COSCredentials;
import com.qcloud.cos.region.Region;

public class TencentCOSConfig {

    private static final String SECRET_ID = "AKIDEtLabQ2QdfT4RedQ0PXT0NaaN1UkpgKm";
    private static final String SECRET_KEY = "JNErHTRCj394mGWYP6bsKbhgV8dx9HFz";
    private static final String REGION = "ap-shanghai"; // 区域

    public static COSClient initCOSClient() {
        COSCredentials cred = new BasicCOSCredentials(SECRET_ID, SECRET_KEY);
        ClientConfig clientConfig = new ClientConfig(new Region(REGION));
        return new COSClient(cred, clientConfig);
    }
}
